# -- coding: utf-8 -- 
# Name: 1_5_integer_conversion

import socket

def convert_integer():
    data = 1234
    print data
    print "32 bit data:"
    print socket.ntohl(data)
    print socket.htonl(data)
    print "16 bit data:"
    print socket.ntohs(data)
    print socket.htons(data)

convert_integer()